import type { LoginResType } from '@/types/login'
import { http } from '@/utils/http'

type LoginParamsType = {
  code:string,
  encryptedData:string,
  iv:string
}
/**
 * 
 * @param data 小程序登录接口
 * @returns 
 */
export const wxLoginHttp = (data:LoginParamsType)=>{
  return http<LoginResType>({
    url:'/login/wxMin',
    method:'POST',
    data,
  })
}
/**
 * 小程序登录-内测版
 * @param phoneNumber 
 * @returns 
 */
export const wxLoginSimpleHttp = (phoneNumber:string)=>{
  return http<LoginResType>({
    url:'/login/wxMin/simple',
    method:'POST',
    data:{
      phoneNumber:phoneNumber,
    },
  })
}
